package com.diandi.activity.mapper;

import com.diandi.activity.bean.Activity;
import com.diandi.activity.bean.ActivityRule;
import com.diandi.activity.bean.LotteryTicket;
import com.diandi.ddsb.bean.PackageInvestTotalAmount;
import com.diandi.ddsb.bean.Rule;
import com.diandi.ddsb.vo.ActivityInfoVo;
import com.diandi.ddsb.vo.ComboboxDataVO;
import com.diandi.ddsb.vo.InvestActStasticsInfoVo;
import com.diandi.ddsb.vo.PrizeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by a on 2018/3/20.
 */
@Repository
public interface ActivityMapper {
    public List<Activity> queryActivitys(Map<String, Object> paramMap);

    public Integer queryActivitysCount(Map paramMap);

    public Map<String , Object> getMiaoJieInvestInfo();

    public List<LotteryTicket> getNotUsedTicketByIds(List<String> list);

    public Long insertActivity(Activity activity);

    public int updateLotteryTicket(LotteryTicket lotteryTicket);

    public Long batchInsertActivityRule(List<ActivityRule> ruleList);

    public ActivityInfoVo getActivityById(@Param(value = "id") Long id);

    List<Rule> queryRuleByActivityId(Long activityId);

    List<PrizeVo> queryPrizeByActivityId(Long activityId);

    public List<ActivityRule> queryActRuleByEntity(ActivityRule activityRule);

    public int updateActivity(Activity activity);

    public List<ComboboxDataVO> queryInvestPeriodsComboxData(long activityId);

    public List<Map<String, Object>> queryInvestTicketsSendInfo(long activityId);

    public Map<String, Object> queryInvestInfo(long activityId);

    public Map<String, Object> queryActTotalInvestAmount(@Param("activityId") Long activityId);

    public List<InvestActStasticsInfoVo> queryInvestStatisticsInfoByCondition(Map<String, Object> condition);

    public List<PackageInvestTotalAmount> queryPackageTotalInvestAmount(Map<String, Object> condition);

    public Integer queryInvestStatisticsInfoCountByCondition(Map<String, Object> condition);

    public int updateLotteryTicketByOldTicketId(LotteryTicket lotteryTicket);
}
